home *** CD-ROM | disk | FTP | other *** search
-
-
- BoundsChecker 5.01
-
- C++Builder Edition
-
-
-
- ReadMe File
-
-
-
-
-
- Contents:
-
-
-
- * Reporting Problems And Suggestions
-
- * Installation Prerequisites
-
- * Installation
-
- * If You Have A Previous Version Of BoundsChecker On Your System
-
- * Removing An Installation
-
- * Known Anomalies
-
- * Technical Notes
-
- * Using BoundsChecker With Visual Test 4.0
-
-
-
-
-
- Reporting Problems and Suggestions
-
- ----------------------------------
-
-
-
- Technical Support is available by e-mail at tech@numega.com or by
-
- calling Technical Support at 603-578-8100. You can also fax us at 603-
-
- 578-8401 (attention: Technical Support).
-
-
-
- Problem reports should include:
-
-
-
- - System Configuration (CPU, RAM, OS, compiler, IDE)
-
- - Detailed problem description (include exact error message text)
-
- - How to reproduce problem
-
- - Whether you are compiling from IDE or command line
-
- - Options used in compiling and linking
-
- - Your error detection mode (Normal, Maximum, or Custom)
-
-
-
-
-
-
-
- Installation Prerequisites
-
- --------------------------
-
-
-
- * PC-compatible Intel 486 system or above
-
- * Microsoft Windows NT 3.51 or 4.0
-
- * Microsoft Windows 95
-
- * RAM: 32 MB minimum, 48 MB recommended
-
- * Disk: 12 MB for full installation
-
- * IDE integration requires Borland C++ Builder 1.0 or later
-
- * Complete debugger integration (Smart Debugging) requires Borland
-
- C++ Builder 1.0 or later.
-
-
-
-
-
- Installation
-
- ------------
-
-
-
- To install BoundsChecker, insert the CD into your CD-ROM drive. Close
-
- any programs that may be running. With Windows 95 or Windows NT 4.0, use
-
- the Add/Remove Programs Control Panel. With Windows NT 3.51, use Program
-
- Manager or File Manager to run setup.exe.
-
-
-
-
-
- If You Have A Previous Version Of BoundsChecker On Your System
-
- --------------------------------------------------------------
-
-
-
- BoundsChecker32/NT or BoundsChecker for Windows 95: BCHK32NT and/or
-
- BCHK32C must not appear in the path before the BoundsChecker directory.
-
- If they do, BoundsChecker may crash or fail to detect errors because it
-
- is trying to load obsolete libraries from the earlier product.
-
-
-
- BoundsChecker 3.x: BoundsChecker 5.0 cannot be installed along with an
-
- installation of BoundsChecker 3.x (you will no longer be able to use
-
- your 3.x installation). If, after installing BoundsChecker 5.0, you need
-
- to use BoundsChecker 3.x, remove BoundsChecker 5.0 using the provided
-
- un-install utility, then re-install BoundsChecker 3.x.
-
-
-
-
-
-
-
- Removing An Installation
-
- ------------------------
-
-
-
- To remove this product, run the Remove BoundsChecker program item.
-
-
-
- "Remove" performs these steps:
-
-
-
- - Removes BoundsChecker registry entries
-
- - Removes BoundsChecker-specific Visual Test registry entries
-
- - Deletes the BoundsChecker program folder and items
-
-
-
- NOTES:
-
- - Files that you created after installation (for example, Help system .GID files)
-
- will not be removed automatically.
-
-
-
-
-
-
-
- Known Anomalies
-
- ---------------
-
-
-
- --- BoundsChecker inadvertently reports an access violation error in the
-
- Program Error Detected window if the application writes to its resource data.
-
- This error report typically occurs once for each page of virtual memory
-
- containing written resource data.
-
-
-
- --- Due to a known problem in Windows95, it is possible to crash the
-
- operating system when halting a program from the BoundsChecker Program
-
- Error Detected window. Windows NT handles this situation properly,
-
- however, Windows95 does not. The problem occurs when an application
-
- calls ExitProcess (which BoundsChecker does to halt the application) and
-
- one of the DLLs used by the application brings up a message box during
-
- its DLL_PROCESS_DETACH processing sequence. To prevent this error
-
- condition, avoid making any calls to MessageBox during your
-
- DLL_PROCESS_DETACH processing.
-
-
-
- --- Due to SmartHeap memory manager usage, it is possible, however
-
- unlikely, that BoundsChecker will report false overruns of dynamically
-
- allocated memory. In order to use BoundsChecker with the memory manager
-
- provided with SmartHeap/HeapAgent, you must add the following lines to
-
- the DEFAULT.DAT file, located in the BoundsChecker DATA directory (these
-
- are the functions that overload malloc, calloc, realloc and free):
-
- _MEM_malloc ID 011
-
- _MEM_calloc ID 015
-
- _MEM_free ID 019
-
- _MEM_realloc ID 022
-
-
-
- Once you have edited DEFAULT.DAT, BoundsChecker will keep track of the
-
- heap correctly; both HeapAgent and BoundsChecker will be able to report
-
- errors to you.
-
-
-
- --- BoundsChecker reports leakage when processing DLL_PROCESS_DETACH.
-
- Since the order in which modules are unloaded cannot be controlled,
-
- erroneous leakage reports can result when a DLL unloads after
-
- BoundsChecker. This can occur when the following conditions are met:
-
- - user DLL allocates memory in DLL_PROCESS_ATTACH
-
- - user DLL frees the allocated memory in DLL_PROCESS_DETACH
-
- - BoundsChecker unloads before the user DLL
-
-
-
- --- In some rare instances, BoundsChecker may falsely report an
-
- incorrect number of arguments for sprintf functions for optimized code.
-
- Use Suppress to prevent a false report on later runs.
-
-
-
- --- Certain OLE interface methods, as implemented in some existing
-
- applications, will return the error code E_NOTIMPL ("not implemented"),
-
- although the OLE documentation indicates that this is not an acceptable
-
- return code for these methods. This is the list of methods for which
-
- this sometimes occurs:
-
-
-
- IOleInPlaceObject::ContextSensitiveHelp
-
- IOleInPlaceObject::ReactivateAndUndo
-
- IOleObject::GetMoniker
-
- IViewObject2::Freeze
-
-
-
- Note that BoundsChecker will notify you of this error even if you are
-
- running in Quick or Normal mode, or have unchecked the 'Check for OLE
-
- "not implemented" return code errors' option in Custom mode. This is
-
- because we base our OLE error checking on documented OLE behavior.
-
-
-
- --- OLE errors reported in OLE system DLLs: In certain circumstances
-
- BoundsChecker can report errors on OLE interface method calls that are
-
- made inside system OLE DLLs such as OLE32.DLL and OLEAUT32.DLL. These
-
- errors are only reported in normal and maximum mode and are always OLE
-
- return failure errors. The reason these errors are reported is because
-
- an interface, that was created and hooked by BoundsChecker, was passed
-
- to an API function and that API is using it. Since the interface was
-
- created in the user's program, we still monitor it for error detection
-
- even if it is inside a system DLL.
-
-
-
-
-
-
-
-
-
- Technical Notes
-
- ---------------
-
-
-
- --- Debugging an NT service: Using the Registry Editor, go to
-
- HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\. Create
-
- a new key called "Image File Execution Options". Under this key, create
-
- a subkey with the name of your service. For example, MYSERV.EXE. To this
-
- subkey, add a REG_SZ value called Debugger. For the Debugger value,
-
- enter the path to the BoundsChecker program (e.g.,
-
- C:\BChecker\BC.EXE). Exit the Registry Editor. Start up the Control
-
- Panel, and double-click on the 'Services' icon. Highlight your service
-
- to be checked. Click the 'Startup...' button. In the dialog box that
-
- appears, select the 'Allow Service to Interact with Desktop' button.
-
- Click OK. If you don't do these steps, BoundsChecker will run, but will
-
- be invisible. At the main Control Panel | Services dialog, start your
-
- service. BoundsChecker should appear, with the service already opened.
-
- At this point, you can set any desired options and then run the service
-
- via BoundsChecker. If your service starts automatically during NT's
-
- bootup, use the Control Panel to set the 'Interact with desktop'
-
- attribute, and then restart the machine. BoundsChecker should start
-
- automatically when the service is started. (IMPORTANT NOTE: This only
-
- works with Windows NT 3.51, or later versions!)
-
-
-
- --- Automatically invoking BoundsChecker when a program is executed
-
- (Windows NT only): You would use this if the program is invoked by some
-
- other process, and you want to run BoundsChecker on this program. NOTE:
-
- This works only on Windows NT, and will not work on Windows 95. As
-
- always, be careful whenever you edit the registry. Using REGEDT32:
-
- 1 Select the key
-
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
-
- 2 Under the selected key, add the following KEY, if it does not exist:
-
- Image File Execution Options
-
- 3 Under "Image File Execution Options" add this KEY:
-
- FOO.EXE
-
- (where FOO.EXE is the name of the program you want to test.)
-
- 4 Under the "FOO.EXE" key add a new VALUE:
-
- Value name: Debugger
-
- Data type: REG_SZ
-
- String: c:\Bchecker\bc.exe
-
- (Where the string value is the full pathname for BoundsChecker on your
-
- machine.)
-
-
-
- --- Startup performance and alternate DEFAULT.DAT files: If your program
-
- takes an unusually long time to start under BoundsChecker, you may want
-
- to use one of the alternate DEFAULT.DAT files shipped with
-
- BoundsChecker. First, backup your existing copy of DEFAULT.DAT by
-
- renaming DEFAULT.DAT (in the BoundsChecker DATA directory) to
-
- DEFAULT.BAK. Then, copy one of the alternate DEFAULT.xxx files to
-
- DEFAULT.DAT:
-
- Microsoft C/C++ (includes Symantec) DEFAULT.MSC
-
- Borland C/C++ (include Watcom) DEFAULT.BOR
-
- Borland Object Pascal (Delphi 2.X) DEFAULT.DPH
-
- All of the above DEFAULT.ALL
-
- NOTE: This is done automatically for you by the Setup program, based on
-
- your compiler choice.
-
-
-
- IMPORTANT: If you need to change or add support for additional compilers
-
- after installing BoundsChecker, make sure to run Setup to install the
-
- appropriate DEFAULT.DAT file (or copy the appropriate file/files as
-
- described above).
-
-
-
- --- Heap exceptions when running under a debugger in Windows NT 3.51:
-
- When an application is debugged, the Windows NT memory management APIs
-
- throw exceptions when bad parameters are detected. BoundsChecker uses
-
- some of these APIs to perform parameter validation, which can cause
-
- these exceptions to be thrown. At the request of many beta testers, we
-
- now disable the Windows NT debug heap during Smart Debugging. If you
-
- wish to re-enable the debug heap when using Smart Debugging, change the
-
- following registry value to 0.
-
-
-
- HKEY_CURRENT_USER
-
- \Software
-
- \Microsoft
-
- \Developer
-
- \BoundsChecker
-
- \DisableHeapException
-
-
-
-
-
-
-
-
-
- Using BoundsChecker With Visual Test 4.0
-
- ----------------------------------------
-
-
-
- When using the BoundsChecker with Visual Test, make sure that your
-
- scripts wait for BoundsChecker to completely finish so all text is
-
- properly sent to your BoundsCheckerNotification handler. If the script
-
- ends before BoundsChecker is finished, some error notifications might
-
- not get through. This is especially true with memory and resource leaks
-
- since the application being tested must completely end before they can
-
- be reported.
-
-
-
- Here are two methods to make sure your script does not end prematurely:
-
-
-
- 1 In the test script, following the commands to close the application
-
- being tested, add a long enough sleep statement to allow BoundsChecker
-
- to get all the information over to the notification handler (You may
-
- need to use a value greater than the 60 used here).
-
- ...
-
- WSysMenu ( 0 )
-
- WMenuSelect ( "&Close" )
-
- Sleep ( 60 )
-
- End
-
- ...
-
-
-
- 2 If the script is run interactively, a Pause statement will display a
-
- message box and wait until the OK button is pressed before the script
-
- will continue.
-
-
-
-
-
-
-
- -----------------------------------------------------------------
-
- Copyright 1997 NuMega Technologies, Inc.
-
- 04/97
-